# -*- coding:UTF-8 -*-
from flask import Flask
from apscheduler.schedulers.background import BackgroundScheduler
from spider_nga.nga import stand_v2
from spider_nga.snowball import mian_do

app = Flask(__name__)


if __name__ == '__main__':
    scheduler = BackgroundScheduler()
    scheduler.add_job(func=stand_v2, trigger='interval', seconds=130)
    scheduler.add_job(func=mian_do, trigger='interval', seconds=60)
    scheduler.start()
    app.debug = False # 设置调试模式，生产模式的时候要关掉debug
    # app.config['JSON_AS_ASCII'] = False
    app.run(host="127.0.0.1", port=7892)
    
    
    
    